package src.tree;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>(Arrays.asList(1,2,3,4,5,6,7));
        TreeNode root = TreeNode.createTree(list);
//        TreeNode.putTree(root);


        Traversal traversal = new Traversal();
        List<Integer> result1;
        result1 = traversal.preorderTraversalRecursive(root);
//        result1 = traversal.inorderTraversalRecursive(root);
//        result1 = traversal.postorderTraversalRecursive(root);

        List<Integer> result2;
        result2 = traversal.preorderTraversal(root);
//        result2 = traversal.inorderTraversal(root);
//        result2 = traversal.postorderTraversal(root);


        List<List<Integer>> result3;
        result3 = traversal.levelOrderTraversal(root);



//        System.out.println(result1);
//        System.out.println(result2);
//        System.out.println(result3);
    }
}
